** Chabot 647
** Project title: Saving for retirement vs. Saving for retirement with others:
**		Motivating saving by framing retirement as a social experience.

/*
** convert data to stata 
clear all
import spss using "TESS3_177_Chabot_Client.sav", clear
save chabot647.dta, replace // note: cannot use older data format because of long strings
*/

** HYPOTHESES

/*
Research question: "The proposed research will test whether helping individuals to realize
the opportunities for social connection in retirement ... increases their willingness
to save more of today's income for retirement.'"

1)  "We predict that participants in the social condition will 
	opt to put a significantly greater percentage of funds into long-term 
	savings than those in the non-social condition."
	
	Test-Hyp-1: Respondents in the social condition will allocate a higher
	proportion of funds from this hypothetical tax refund into 

2) "We propose to measure real-world intentions by asking participants, 
	How likely are you to make a change to your retirement savings rate 
	in the next 2 weeks?"

	Test-Hyp-2: Respondents in the social condition will be more likely to
	indicate that they are planning to make a change to their retirement
	savings rate.
	
3) 

	Test-Hyp-3: Did respondents report making a change to their savings rate
	1 week out?
	
	Test-Hyp-4: Did respondents report making a change to their savings rate
	2 weeks out?
	
	Note: respondents are also asked their savings rate in these follow-up
	surveys, but unclear what a difference in rates would mean if respondents
	weren't more likely to make change after experiment.
	
*/

********************************************************************************

* CONSTRUCT INDICATORS OF EXPERIMENTAL MANIPULATIONS

use Chabot647, clear

* treatment is the "social condition"
gen treatment = (XTESS177 == 2) if XTESS177 < .


* CONSTRUCT OUTCOME MEASURES

* proportion of hypothetical tax refund to go to retirement
gen retirement_prop = Q2_2 / Q2_TOTAL if Q2_TOTAL != -1


* plans to change retirement -- higher values equal more likely
gen plan_to_change = Q3 if Q3 != -1


* did the respondent change their retirement plans 1 week (wave 2) or
*	2 weeks later (wave 3)

gen did_increase_wave2 = (W2_1 == 1) if W2_1 != -1 & W2_1 < .
gen did_increase_wave3 = (W3_1 == 1) if W3_1 != -1 & W3_1 < .

* what is retirement savings rate
gen savings_rate_wave2 = W2_2 if W2_2 != -1
gen savings_rate_wave3 = W3_2 if W3_2 != -1

*******************************************************************************

** ANALYSIS

/*
Test-Hyp-1: Respondents in the social condition will allocate a higher
proportion of funds from this hypothetical tax refund into 
*/

	regress retirement_prop i.treatment
	// NOT SUPPORTED -- p = .113 in wrong direction
	tess 1.treatment +, init(Chabot647) bonf(2)

/*
Test-Hyp-2: Respondents in the social condition will be more likely to indicate 
that they are planning to make a change to their retirement savings rate.
*/

	regress plan_to_change i.treatment
	// NOT SUPPORTED -- p = .066 in wrong direction
	tess 1.treatment +, bonf(2)

/*
Test-Hyp-3: Did respondents report making a change to their savings rate
1 week out?
*/

	reg did_increase_wave2 i.treatment
	// NOT SUPPORTED -- p = .788
	tess 1.treatment	
	
/*	
Test-Hyp-4: Did respondents report making a change to their savings rate
2 weeks out?
*/
	
	reg did_increase_wave3 i.treatment	
	// NOT SUPPORTED -- p = .129 in wrong direction
	tess 1.treatment

// check d for hyp4: calculate d

	reg did_increase_wave3 i.treatment	
		local dif = _b[1.treatment] // mean difference
		sum did_increase_wave3
	local d = abs(`dif') / `r(sd)'
	di "Cohen's d = " `d'

